package com.bcn.login_mybatis_demo.mapper;

import com.bcn.login_mybatis_demo.pojo.User;
import com.bcn.login_mybatis_demo.pojo.UserDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author 大白菜
 * @date Created in 2022/9/26 14:56
 */
@Mapper
@Repository
public interface UserMapper {
    User selectUserByUact(String uact);
    User selectUserById(Integer id);
    String selectUpwdByUact(String uact);
    List<User> selectAllUser(@Param("userDTO")UserDTO userDTO, @Param("offset")int offset, @Param("pageSize")int pageSize);
    User selectUserByUid(int uid);
    void delUser(int uid);
    void insertUser(User user);
    void updateUser(User user);

    long countUsers(@Param("userDTO")UserDTO userParams);
}
